<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/views/common/taglibs.jsp" %>
<!DOCTYPE>
<html>
<head>
	<!-- 引入通用js、css文件(xiaogq) -->
	<meta name="decorator" content="bootstrap">
	<link rel="stylesheet" type="text/css" href="${ctx}/css/common/operation/sys_operation.css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/css/common/operation/list_operation.css"/>
</head>

<body>
	<div class="button_list">
		<a href="javascript:;" onclick="lastStep(this)">
			<span class="span_button">
				<span><img src="${ctx}/image/common/operation/oper_preStep.png"></span>
				<span name="buTitle">上一步</span>
			</span>
		</a>
		<a href="javascript:;" onclick="nextStep(this)">
			<span class="span_button">
				<span><img src="${ctx}/image/common/operation/oper_nextStep.png"></span>
				<span name="buTitle">下一步</span>
			</span>
		</a>
		<a href="javascript:;" onclick="javascript:parent.closeTab();">
			<span class="span_button">
				<span><img src="${ctx}/image/common/operation/oper_CANCEL.png"></span>
				<span name="buTitle">取消</span>
			</span>
		</a>
	</div>
	<!-- sheet数据 -->
	<div class="content-wrap">
		<div style=" height: auto; padding: 5px; width: 50%;display:table;">
			<table style="width:100%; text-align: center;">
				<tr>
					<td style="width:80%;">
						<select id="sheetIndex" style="height: 25px;padding: 2px;width: 100%;border: 1px solid #BBBBBB;font-size: 12px;">
				          	<c:forEach var="sm" items="${sheetMap}" varStatus="status">
				               <option value="${status.count}">${sm}</option>
				            </c:forEach>
				        </select>
			        </td>
			        <td style="text-align:left;">
			        	 <lable style="">
				        	<input type="checkbox" id="checkedbox" name="chenkedbox" checked="checked">有标题栏
				       	 </lable>
			        </td>
				</tr>
			</table>
		</div>
		<!-- 加载bootstrap表格组件div  -->
		<div class="bootstrap_div">
			<table id="bootstrapTable"
				   data-striped="false"
				   data-toggle="table"
				   data-show-columns="true"
				   data-cookie="false"
				   data-search="false"
				   data-show-refresh="true"
				   data-pagination="false"
				   data-url="${ctx}/ExportImport/showImportValue.do"
				   data-side-pagination="server"
				   data-checkbox-header="true"
				   class="table">
				<thead>
					<tr>
						${column}
					</tr>
				</thead>
			</table>
		</div>
	</div>

	<script type="text/javascript">
		//上一步
		function lastStep(){
			//得到实体名称
			var entityName = "${entityName}";
			var entityId = "${entityId}";
			var url="ExportImport/importchoosefile.do?entityId="+entityId+"&entityName="+entityName;
			parent.replaceIframe({title:"导入:"+entityName,url:url});
		}

		//下一步方法
		function nextStep(){
			//得到实体名称
			var entityName = "${entityName}";
			var sheetIndex = $("#sheetIndex").val();
			var entityId = "${entityId}";
			var fileName = "${fileName}";
			var url = "ExportImport/resolveImportFileCell.do?entityId="+entityId+"&fileName="+fileName+"&sheetIndex="+sheetIndex+"&entityName="+entityName;
			parent.replaceIframe({title:"导入:"+entityName+":映射字段",url:url});
		}
	</script>
</body>
</html>